/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package questionbook.service;

import java.util.List;
import questionbook.exception.IndividualAlreadyExistsException;
import questionbook.model.Person;
import questionbook.model.Question;
import questionbook.model.Suggest;
import questionbook.service.common.GenericService;

/**
 * This Service holds all Methods for all CRUD-Operations
 * that belong to the Suggest-Model
 *
 * @author stefanstift
 */
public interface SuggestService extends GenericService {


    /**
     * Persists the Suggest in the Store
     *
     * @param suggest
     */
    public void persist(Suggest suggest);

    /**
     *
     * @param q
     * @return a List of all Suggests for the specified Question
     */
    public List<Suggest> getByQuestion(Question q);

    /**
     *
     * @param p
     * @return a List of all Suggests for which the specified Person was suggested
     */
    public List<Suggest> getByPerson(Person p);

    /**
     * Delete Suggest from the Store
     *
     * @param suggest
     */
    public void delete(Suggest suggest);

    /**
     *
     * @return a Suggest Object with an generated URI, ready to use and to persist
     * @throws IndividualAlreadyExistsException
     */
    public Suggest getIdentifiedSuggest() throws IndividualAlreadyExistsException;

}
